//
//  HJUserApplyModel.m
//  KaiChat
//
//  Created by lx on 2023/10/21.
//

#import "HJUserApplyModel.h"

@implementation HJUserApplyModel

MJLogAllIvars

+ (NSDictionary *)mj_replacedKeyFromPropertyName {
    return @{
        @"userId": @"id",
        @"date": @"created_at",
        @"avatar": @"profile_picture",
        @"sessionId": @"session_id",
    };
}


+ (NSArray *)bg_uniqueKeys {
    return @[@"userId"];
}
//
//+ (NSArray *)bg_ignoreKeys {
//    return @[];
//}
 
- (NSString *)bg_tableName {
    return [NSString stringWithFormat:@"%@_%@", NSStringFromClass(self.class), HJUserInfo.userId];
}

+ (NSString *)bg_tableName {
    return [NSString stringWithFormat:@"%@_%@", NSStringFromClass(self.class), HJUserInfo.userId];
}

+ (HJUserApplyModel *)modelWithDict:(NSDictionary *)dict {
    HJUserApplyModel *model = [[HJUserApplyModel alloc] init];
    model.date = dict[@"created_at"];
    model.userId = dict[@"id"];
    model.nickname = dict[@"nickname"];
    model.avatar = dict[@"profile_picture"];
    model.sessionId = toString(dict[@"session_id"]);
    model.status = dict[@"status"];
    model.way = dict[@"way"];
    return model;
}

@end
